<?php

namespace App\Http\Validate\Refund;

use App\Http\Validate\BaseValidate;

/**
 * 退款验证器
 */
class Refund extends BaseValidate
{
    //验证规则
    protected $rule = [];
    //自定义验证信息
    protected $message = [];

    public function __construct($doaction = 'add')
    {
        if ($doaction == 'add') {
            $this->rule = [
                'custom_id' => 'required',
                'custom_name' => 'required',
                'refund_amount' => 'required',
            ];
            $this->message = [
                'custom_id.required' => '客户id不能为空',
                'custom_name.required' => '客户名称不能为空',
                'refund_amount.required' => '退款金额不能为空',
            ];
        }
    }
}
